package org.example.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.example.entity.Pubinformation;
import org.example.service.IPubinformationService;
import org.example.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Api(tags = "房间管理")
@RestController
@CrossOrigin
@RequestMapping("/scs")
public class PubinformationController {
    @Autowired
    private IPubinformationService pubinformationService;

    //房间管理
    @ApiOperation("根据房间Id获取房间信息")
    @RequestMapping("/get-pubRoom")
    public Result getPubRoom(@RequestParam Integer roomId){
        Pubinformation pub = pubinformationService.getPubRoomByPubId(roomId);
        return new Result("200", "查询成功",pub);
    }
}
